package com.fqh.service;

import com.fqh.dto.PayInfo;
import com.fqh.entity.Order1;

import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;

public interface OrderService {


    void orderFood(String name, String id, String number);

    void addMenu(String loginName, String foodId) throws Exception;

    Integer alreadyOrder(String loginName);

    List findAllList(String loginName);

    void addNumber(String foodId, String loginName) throws Exception;

    String reduceNumber(String foodId, String loginName);

    String delFoodById(String foodId, String loginName);

    void putInfo(HttpServletRequest request);

    void deleteRedis(HttpServletRequest request);

    void addOrderManage(HttpServletRequest request);

    List<Order1> findAllOrder(Integer loginId);

    /**
     * 获取支付信息
     *
     * @param request
     * @return
     */
    PayInfo getPayInfo(HttpServletRequest request);

    /**
     * 获取支付请求参数
     *
     * @param request
     * @return
     * @throws UnsupportedEncodingException
     */
    Map<String, String> getPayRequestParam(HttpServletRequest request) throws UnsupportedEncodingException;

    /**
     * 根据支付信息，刷新session
     *
     * @param request
     */
    void updateSessionByPayInfo(HttpServletRequest request);
}
